import React from 'react'
import { Tabbar } from 'react-vant'
import { Outlet, useNavigate } from 'react-router-dom'
import { housrouters } from '../../router'

function Index() {

    let nav=useNavigate()
  return (
    <div style={{height:'50px'}}>
        
        <Outlet></Outlet>
        <Tabbar onChange={(active)=>nav(active)}>
        {
            housrouters.map((item,index)=>(
                <Tabbar.Item key={index}  name={item.path} icon={item.icon}>{item.title}</Tabbar.Item>
            ))
        }
      </Tabbar>
    </div>
  )
}

export default Index
